package com.flyduck.mall.oms.domain;

import com.flyduck.ss.common.tenant.core.TenantEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serial;

/**
 * 订单对象 oms_order
 *
 * @author flyduck
 * @date 2025-01-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("oms_order")
public class OmsOrder extends TenantEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId(value = "id")
    private Long id;

    /**
     *
     */
    private String sn;

    /**
     *
     */
    private Long userId;

    /**
     * 总价
     */
    private BigDecimal totalAmount;

    /**
     * 运费
     */
    private BigDecimal freight;

    /**
     * 订单状态：0->待付款；1->待发货；2->待收货；3-已完成；4->已取消；5-申请退款，6->已退款，7->退款失败
     */
    private Integer orderStatus;

    /**
     * 支付时间
     */
    private Date payTime;

    /**
     * 支付交易号
     */
    private String payTradeNo;

    /**
     * 发货时间
     */
    private Date deliveryTime;

    /**
     * 确认收货时间
     */
    private Date receiveTime;

    /**
     *
     */
    private Date completeTime;

    /**
     *
     */
    private Date refundTime;

    /**
     * 收货人
     */
    private String receiverName;

    /**
     *
     */
    private String receiverAddress;

    /**
     *
     */
    private String receiverTel;

    /**
     *
     */
    private String receiverAreaCode;

    /**
     *
     */
    private String receiverPostalCode;

    /**
     *
     */
    private String deliveryCompany;

    /**
     *
     */
    private String deliverySn;

    /**
     *
     */
    private String adminNote;

    /**
     * 备注
     */
    private String note;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    private String delFlag;

    /**
     * 备注
     */
    private String remark;


}
